package com.lyx.crm.dao;

import com.lyx.crm.base.BaseMapper;
import com.lyx.crm.vo.Permission;

import java.util.List;

public interface PermissionMapper extends BaseMapper<Permission, Integer> {

    //通过角色ID查询权限记录
    Integer countPermissionByRoleId(Integer roleId);

    //通过角色ID删除权限记录
    Integer deletePermissionByRoleId(Integer roleId);

    //通过角色id查询资源
    List<Integer> queryRoleHasModuleIdsByRoleId(Integer roleId);

    //通过用户id查询对应的资源（资源权限吗）
    List<String> queryUserHasRolePermissionByUserId(int userId);
}